package com.example.modelviewpresenter.View;

import android.content.Context;
import android.os.Bundle;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.modelviewpresenter.Presenter.InitPresenter;

public abstract class BasterActivity <Presenter extends InitPresenter> extends AppCompatActivity implements InitActivity,InitView {


    protected Presenter presenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(BandLayout());
        initView();
        initDate();
    }

    @Override
    public void ShowLayout() {

    }

    @Override
    public void HaidLayout() {

    }


    @Override
    public void TostLayout(Context context, String name) {
        Toast.makeText(context,name,Toast.LENGTH_SHORT).show();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        if (presenter!=null)
        {
            presenter=null;
            presenter.DiterPresenter();
        }


    }
}
